<template>
	<view>
		<view class="u-padding-20" style="background-color: #0c838b;" @click="tosearch">
			<u-search v-model="keyword" placeholder="请输入商品名称或订单编号" :show-action="true" action-text="搜索" :animation="true" @search="searchVisit" @custom="searchVisit"></u-search>
		</view>
		<view class="u-padding-20">
			<u-swiper class="swiper_con" height='540rpx' :list="bannerList" imgMode="heightFill" mode="number" borderRadius="0" indicatorPos="bottomRight"></u-swiper>
		</view>
		<view class="u-padding-20 u-flex u-row-between">
			<view class="tag_type" @click="trellisGoods">
				<u-icon name="tags-fill" color="#3bd5f0" size="78"></u-icon>
				<text class="dis_blo">商品管理</text>
			</view>
			<view class="tag_type" @click="trellisOrder">
				<u-icon name="file-text-fill" color="#ff9e08" size="78"></u-icon>
				<text class="dis_blo">订单管理</text>
			</view>
		</view>
		
		<view class="fabu" @click="trellisRelease">
			<image src="../../static/release.png" mode="heightFix"></image>
		</view>
	</view>
</template>

<script>
	import {
		getBanner
	} from "@/service/indexService.js";
	export default {
		data () {
			return {
				bannerList:[],
				keyword:''
			}
		},
		onLoad() {
			getBanner({
				type: 2
			}).then(this.getBanner);
		},
		methods:{
			getBanner(e) {
				if (e.code == 200) {
					this.bannerList=e.result;
				}
			},
			trellisGoods:function(){
				uni.navigateTo({
					url:'./trellisGoods'
				})
			},
			trellisOrder:function(){
				uni.navigateTo({
					url:'./trellisOrder'
				})
			},
			trellisRelease:function(){
				uni.navigateTo({
					url:'./trellisRelease'
				})
			},
			tosearch:function(){
				uni.navigateTo({
					url:'./searchTrellis'
				})
			}
		}
	}
</script>

<style lang="scss">
	swiper{
		height:340rpx !important;
	}
	.tag_type{
		width:47%;
		padding:30rpx 0;
		text-align: center;
		border-radius: 20rpx;
		box-shadow: 0 0 15rpx #ddd;
	}
	.tag_type text{
		margin-top:10rpx;
		color:#555;
	}
	.fabu{
		position: fixed;
		bottom:150rpx;
		right:30rpx;
		width:100rpx;
		height:100rpx;
		// text-align: center;
		border-radius: 50%;
	}
	.fabu image{
		width:100rpx;
		height:100rpx;
	}
</style>
